In the field of hard disk drives (hereinafter sometimes simply referred to as disk drives), a method for writing data called shingled write magnetic recording (SMR) has recently been developed to increase the recording density of disks that are recording media.
According to the SMR method, data is overwritten at a write head width larger than a read track width on a disk, and thus one side of recorded tracks is erased. This precludes a rewrite operation in units of tracks, and thus, data needs to be rewritten in units of recording areas (bands described below) each comprising a plurality of tracks. Consequently, the SMR method requires a relatively long processing time compared to a conventional rewrite process.
As a method for improving the efficiency of such a rewrite process, the use of both a media cache and a spare band has been proposed. The media cache is a specified recording area on the disk or a temporary data saving area (or a buffer area) that is formed of a nonvolatile memory such as a flash memory.
Furthermore, the spare band is a user data area which is distinguished from a band (hereinafter sometimes referred to as a user band) that is a normal user data area on the disk but which has the same capacity as that of the user band. The spare band can be changed to a user band by being assigned logical addresses (LBAs). That is, when user data is recorded in a spare band and LBAs are assigned to the spare band, the spare band is changed to a user band. In contrast, those of the other user bands which are not assigned any LBAs are managed as spare bands.
In particular, if a write command allowing a host to consecutively write data to a disk is processed, a rewrite process can be carried out more efficiently by writing those of the consecutive data which have certain LBAs to a spare band and writing data with the other LBAs to a media cache. The consecutive data is write data with sequentially consecutive logical addresses (LBAs).
However, the data continues to be written to the media cache until a new spare band is secured. This inevitably increases a load on the media cache. Thus, a possible decrease in the amount of free space in the media cache may cause a delay in a response to a subsequent write command, reducing the efficiency of the rewrite process.